package com.example.controller;

import com.example.config.MyGoodsFeignClient;
import com.example.entity.Goods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private MyGoodsFeignClient myGoodsFeignClient;
    @GetMapping("/test/{id}")
    public Goods find(@PathVariable("id") Integer id){
        Goods goods = myGoodsFeignClient.find(id);
        return goods;
    }
}
